package com.homework04;

import java.util.Scanner;

/*
需求某歌唱比赛，需要开发一个系统：可以录入6名评委的打分，
录入完毕后立即输出平均分做为选手得分。
*/
public class work08 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        double[] score = new double[6];
        double sum = 0;
        System.out.println("请输入6名评委的打分，每输入一个评分按一下回车键：");
        for (int i = 0; i < 6; i++) {
            System.out.println("请输入第" + ((int)i+1) + "个评分：");
            double a = scanner.nextDouble();
            score[i] = a;
            sum += a;
        }
        double average = sum / score.length;
        System.out.println("平均分为：" + average);
    }
}
